Holy on Dev
It will only take one hour... (On why programmers suck at estimating and the perils of software development)
Programming is difficult and there are always unforeseen complications. It is crucial to have the right mindset and approach (and focus). Good tools really matter a lot. Invest into “developer-friendliness,” making issues easier to understand and faster to resolve and making (manual) testing easier. Beware accidental complexity and invest into making your systems “simple”.
How to use Clojure 1.10 pREPL to connect to a remote server (WIP)
Clojure 1.10 includes a new, program-friendly REPL or prepl (pronounced as “preppy,” not p-repl). However there is still very little documentation about it, though it is reportedly in making (it is alpha, after all). Here I want to demonstrate how to start it and how to connect to it in a primitive way (I hope to improve the user experience of the client eventually).
AWS RDS: How to find out login credentials to the database
To log in to your AWS RDS database (Oracle in my case) you need login credentials, but what are these for a newly created DB? The password is the master user password you entered during DB creation and which you can change via the Console.
To find out the master user name:
aws rds describe-db-instances --output table --query 'DBInstances[*].DBInstanceIdentifier'
aws rds describe-db-instances --db-instance-identifier <an identifier from the previous table> \ --query 'DBInstances[*].MasterUsername'
Migrating from Wordpress.com to a static site generated by GatsbyJS
If you are interested in the details of the migration, check out the blog code at GitHub, especially blog2md-master/index.js and gatsby-node.js. The core of the process is using
blog2mdto turn Wordpress export XML into .json files and then loading those into Gatsby and suing custom code in
gatsby-node.jsto create an “adapter” node type
ContentPagefor both new Markdown-based posts and the old ones from the .json. In practice it is somewhat more complicated that it sounds - just as always.
Java: Simulating various connection problems with Toxiproxy
How I got fired and learned the importance of communication and play time
When I came to the office one late autumn morning in 2005, I have been shocked to find out that - without any warning signs whatsoever - I hd been fired. That day I have learned the importance of communication. Their criticism was justified but the thing is, nobody bothered to tell me anything during my 11 months in the company. I received exactly 0 feedback about my behaviour or work. The company ended up at court with its client - which both explains why they were stressed and was also caused by bad communication. So communication - even, or especially under stress - is really important. It must be open, transparent, and broad.
The funny thing is that I still do the things they fired me for.
Clojure - comparison of gnuplot, Incanter, oz/vega-lite for plotting usage data
What is the best way to plot memory and CPU usage data (mainly) in Clojure? I will compare gnuplot, Incanter with JFreeChart, and vega-lite (via Oz). (Spoiler: I like Oz/vega-lite most but still use Incanter to prepare the data.)
The data looks like this:
;; sec.ns | memory | CPU % 1541052937.882172509 59m 0.0 1541052981.122419892 78m 58.0 1541052981.625876498 199m 85.9 1541053011.489811184 1.2g 101.8
The data has been produced by monitor-usage.sh.
Gnuplot is the simplest, with a lot available out of the box. But it is also somewhat archaic and little flexible.
How good monitoring saved our ass ... again
You know how it goes - suddenly people complain your app does not work, your are getting plenty of timeouts or other errors in your error tracking tool, you find the backend app that is misbehaving and finally "fix" the problem by restarting it. Phew!
Beware the performance cost of async_hooks (Node 8)
I was excited about async_hooks having finally landed in Node.js 8, as it would enable me to share important troubleshooting information with all code involved in handling a particular request. However it turned out to have terrible impact of our CPU usage (YMMV):
Monitoring process memory/CPU usage with top and plotting it with gnuplot
If you want to monitor the memory and CPU usage of a particular Linux process for a few minutes, perhaps during a performance test, you can capture the data with
topand plot them with
gnuplot. Here is how:
Troubleshooting javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Re-published from the Telia Tech Blog.
Pains with Terraform (perhaps use Sceptre next time?)
Cross-posted from Telia's Tech Blog
We use Amazon Web Services (AWS) heavily and are in the process of migrating towards infrastructure-as-code, i.e. creating a textual description of the desired infrastructure in a Domain-Specific Language and letting the tool create and update the infrastructure.
We are lucky enough to have some of the leading Terraform experts in our organisation so they lay out the path and we follow it. We are at an initial stage and everything is thus "work in progress" and far from perfect, therefore it is important to judge leniently. Yet I think I have gain enough experience trying to apply Terraform both now and in the past to speak about some of the (current?) limitations and disadvantages and to consider alternatives.
Why we love AWS Beanstalk but are leaving it anyway
Cross-posted from Telia's Tech Blog.
We have had our mission-critical webapp running on AWS Elastic Beanstalk for three years and have been extremely happy with it. However we have now outgrown it and move to a manually managed infrastructure and CodeDeploy.
AWS Beanstalk provides you with lot of bang for the buck and enables you to get up and running in no time:
- Simple, no-downtime deployment and automatic roll-back based on user-provided health-check (either one subset of nodes at a time or blue-green deployment)
- Managed updates - security fixes and other improvements installed automatically
- Built-in HTTP Proxy with caching in front of your application
- Monitoring dashboard with alerting and access to logs without the need for SSH
- A list of past versions & ability to roll-back
- Support for many runtimes (Java, Node.js, Docker to name just a few)
So if you need a solid, state-of-the-art infrastructure for a web-scale application and you don't have lot of time and/or skill to build one on AWS on your own, I absolutely recommend Beanstalk.
How to patch Travis CI''s deployment tool for your needs
Travis CI is a pretty good software-as-a-service Continuous Integration server. It can deploy to many targets, including AWS BeanStalk, S3, and CodeDeploy.
However it might happen that the deploy tool (dpl) has a missing feature or doesn't do exactly what you need. Fortunately it is easy to fix and run a modified version of the tool, and I will show you how to do that.
Experience: Awesome productivity with ClojureScript''s REPL
Re-posted from Telia's tech blog.
- Next (24)