Alex Miller - Java Concurrency Bugs #2 - what to synchronize on
Following up on my previous post, this is the second installment of Java Concurrency Bugs. In this post, we’ll look at bugs that come from synchronizing on the wrong object.
Related cards:
Capistrano 2: Which Capistrano hooks to use for events to happen on both "cap deploy" and "cap deploy:migrations"
When deploying an application with "cap deploy
" by default [1] you only deploy your code but do not run migrations. To avoid an application to be running with code which requires database changes that did not happen yet you should use `cap deplo...
How to use the Capistrano 2 shell to execute commands on servers
Capistrano 2 brings the shell
command which allows you to run commands on your deployment targets.
There is also invoke
to run a command directly from your terminal.
Both commands allow running Capistrano tasks or shell commands, and scope to...
How to find out what is running on a port on a remote machine
By convention, common protocols use a defined port, like 80 for HTTP or 443 for HTTPS.
You can use nmap
to find out what service is running behind a given port, and most often see some details about it. This can be helpful if servers don't offe...
Upgrading from Capistrano 2 to 3
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest change is that they moved away from their custom DSL and use Rake
instead. For connecting with and operating on the ...
cucumber_factory: How to keep using Cucumber 2 Transforms in Cucumber 3
Cucumber up to version 2 had a neat feature called Step Argument Transforms which was dropped in favor of Cucumber 3 [ParameterTypes](https://cucumber.io/blog/upgrading-to-cucum...
InfoQ: How to Design a Good API & Why it Matters
A well-written API can be a great asset to the organization that wrote it and to all that use it. Given the importance of good API design, surprisingly little has been written on the subject. In this talk (recorded at Javapolis), Java library desi...
How to: Use git bisect to find bugs and regressions
Git allows you to do a binary search across commits to hunt down the commit that introduced a bug.
Given you are currently on your branch's HEAD that is not working as expected, an example workflow could be:
git bisect start # Start bisectin...
How to fix gsub on SafeBuffer objects
If you have an html_safe
string, you won't be able to call gsub
with a block and match reference variables like $1
. They will be nil
inside the block where you define replacements ([as you already know](https://makandracards.com/makandra/2...
MySQL: How to create columns like "bigint" or "longtext" in Rails migrations, and what :limit means for column migrations
Rails understands a :limit
options when you create columns in a migration. Its meaning depends on the column type, and sometimes the supplied value.
[The documentation](http://apidock.com/rails/ActiveRecord/ConnectionAdapters/TableDefinition/co...
Cucumber: Wait for any requests to finish before moving on to the next scenario
Background
Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is thrown.
Now, consider a scenario like this:
@javascript
Scenario: Receive an e-mail after clicking the fancy link...