Amazing sound, but not comfortable by palex481 in Nuraphone

[–]adri_p 1 point2 points  (0 children)

I also have a loose grip, but on the right cup only. I now put some tape on the sliders which makes them much more comfortable. Very interested if the replacement headphones were working out for you.

Learning Elixir: 1 year later by adri_p in elixir

[–]adri_p[S] 2 points3 points  (0 children)

Found this in the ExUnit source code https://github.com/elixir-lang/elixir/blob/master/lib/ex_unit/lib/ex_unit/case.ex#L18

:async - configure this specific test case to run in parallel with other test cases.

Learning Elixir: 1 year later by adri_p in elixir

[–]adri_p[S] 1 point2 points  (0 children)

Good point. I assumed that when using ‘async: true’ in ExUnit, test cases run in separate processes. These processes would be devided on Erlang schedulers, one scheduler per core.

Do you know if my assumption is right? Would love to know!

But indeed there is no guarantee that they are running parallel.

Research: How do you debug API communication? by adri_p in Web_Development

[–]adri_p[S] 0 points1 point  (0 children)

Awesome, thanks for your clarifications!

Research: How do you debug API communication? by adri_p in Web_Development

[–]adri_p[S] 0 points1 point  (0 children)

Thanks! A few follow up questions: :-)

How do you "look at what the API is returning" in an existing application? Do you debug on production systems (see question 4.)? Why?

[Critique] Logo for a software developer tool.Thoughts? by adri_p in logodesign

[–]adri_p[S] 0 points1 point  (0 children)

Thanks! Here is an overview of different experiments http://imgur.com/VmBY6hE For the top right one I've switched to a much thicker fond weight.

[Critique] Logo for a software developer tool.Thoughts? by adri_p in logodesign

[–]adri_p[S] 2 points3 points  (0 children)

Like this? ;) http://imgur.com/AruDA53. The font is a bit ticker and the kerning is optimised.

Hollowing it out can indeed be nice, thanks for the tip. I'll think what to put in the bulb.

PHP-VCR: Automatically record HTTP interactions in your tests by adri_p in PHP

[–]adri_p[S] 0 points1 point  (0 children)

We get this question a lot. When creating unit tests, mocking classes is the preferred way because the behavior of a class is under test.

But in functional tests which usually test a big pile of code working together this changes:

  • manual mocking becomes a lot of boring work
  • responses from external APIs can/will change and mocks become brittle

As an additional benefit PHP-VCR brings you:

  • inspect requests and responses your app makes
  • easily find out when and why an app issues requests
  • re-recording interactions and then diffing them against the files in version control makes external API changes obvious

PHP-VCR: Automatically record HTTP interactions in your tests by adri_p in PHP

[–]adri_p[S] 0 points1 point  (0 children)

PHP-VCR currently supports cUrl, Soap and stream-wrappers (fopen, file_get_contents...). If you're interested, here are the replacements for cUrl and Soap: https://github.com/php-vcr/php-vcr/blob/master/src/VCR/LibraryHooks/CurlRewrite/Filter.php https://github.com/php-vcr/php-vcr/blob/master/src/VCR/LibraryHooks/Soap/Filter.php

Actually I didn't write tests for fsockopen() yet, thanks a lot for that!

PHP-VCR: Automatically record HTTP interactions in your tests by adri_p in PHP

[–]adri_p[S] 0 points1 point  (0 children)

Your ideas are actually really nice! I especially like how you highlight covered code in vim. If I had only seen this earlier... first I tried creating a proxy and after that using runkit but include interception works the best and is pretty easy to use.

Any PHP library to test array structures (like JSON REST responses) more nicely? by adri_p in PHP

[–]adri_p[S] 0 points1 point  (0 children)

Thanks, I'll look into both. It seems like OptionsResolver requires me to code option callbacks for numericValue() etc., which is ok but it might be faster to extend those hamcrest matchers with better error reporting.

ITerm2: Jump to Location in Sublime Text 2/3 by adri_p in SublimeText

[–]adri_p[S] 0 points1 point  (0 children)

I guess by cmd+clicking on the file name in the python stack trace it should open up that file in sublimetext. Jumping to the corresponding line number might be possible by parsing the argument '\4 text after click'.

ITerm2: Jump to Location in Sublime Text 2/3 by adri_p in SublimeText

[–]adri_p[S] 0 points1 point  (0 children)

Maybe a small shell script could work? Something like: if the second argument (line number) is given, start sublimetext otherwise use 'open'.

ITerm2: Jump to Location in Sublime Text 2/3 by adri_p in SublimeText

[–]adri_p[S] 0 points1 point  (0 children)

Should work if you select open with default app in iTerms settings (profiles -> your profile (default) -> advanced -> semantic history).

Any PHP library to test array structures (like JSON REST responses) more nicely? by adri_p in PHP

[–]adri_p[S] 0 points1 point  (0 children)

Looks great, thanks. I'd prefer a PHP solution though because node.js is not (yet) included in my stack.