We are currently witnessing an internet paradigm shift — in reverse.
Once upon a time in the heyday of chain mail, RSS and web rings, before bloggers were bloggers, when people hosted everything on their own servers, content was king.
The internet was weird and wonderful and useful.
Then we all collectively [1] decided that owning our own content was for losers and posting on a centralized system with likes, shares, and reblogs was clearly the superior approach.
Here’s a thought:
“Most software applications consist of the same basic functions in different configurations”.
Let’s play with that. Imagine a super-high-level language that could describe a software application tersely, but still capture the usefulness of the application.
Example 1
App: Twitter
Allow user to: login
Allow user to: send a tweet
Allow user to: follow another user
Allow user to: view a timeline of tweets(further examples here)
login
is pretty self explanatory and so common that we can assume it’s baked into the language. login
becomes library.login
indicating we will use provided library behaviour and not a custom implementation. …It turns out there’s a lot to learn by examining the cadence and variety of your side-projects…
I recently defended my PhD and in the process of preparing for the defence, I discovered that an old backup hard-drive was damaged beyond repair. Thankfully I had a further backup, but it got me thinking:
There’s a lot of stuff here that I probably will never look at again, but it’s important to me that I recognise it’s existence.
I hope I never have to look back at the PHP I wrote when I was learning, but I spent months cobbling together SQL queries and designing objectively terrible pages, and that process is important, at least to me. …
This is a piece of code I wrote for a previous blog post about writing a Custom Mocha Reporter. I wanted to generate HTML output from a template, but I didn’t need much functionality or an extra dependency. Turns out, it’s not that difficult.
Programmatically generating or producing HTML is not rocket science. The typical approach is:
Warning: This article is basically tech arts-and-crafts.
I want to display a screen in the office showing the latest unit test results, like a notice board, so the whole team can see the test status —and we wont miss failing tests.
We use Mocha to run unit tests in Node (nodejs). Jenkins watches our git repo and runs tests when we push new code.
The final product (github, and npm package) is viewed in a browser, refreshed automatically and looks something like this:
Here’s a quick and easy tip that will speed up your docker builds for Python, Nodejs or any project that requires installing dependencies…
If you are installing dependencies, copy only your dependency list before installing (package.json in Node or requirements.txt in python with pip), then move your application code.
If your Dockerfile looks something like this:
FROM python:3.6-alpine
COPY . /app
RUN pip install -r /requirements.txt
CMD [ "python", "/app/yourscript.py" ]
Change it to:
FROM python:3.6-alpine
COPY requirements.txt /
RUN pip install -r /requirements.txt
COPY . /app
CMD [ "python", "/app/yourscript.py" ]
If your Dockerfile looks something like this:
FROM node:8
COPY . /app
RUN npm install --production
EXPOSE 3000
CMD ["node"…
Unlike a lot of the internet, I happen to enjoy writing Javascript. I’m also a fan of functional programming; from a practical point of view, and from an aesthetic point of view. In the art of code, functional is beautiful.
Unfortunately, like most JS developers, my love of functional code is at odds with the asynchronous nature of the language.
This will be a quick post, but I have to share! After months and months of work, the first units of the Posture Laptop Stand are finally ready to be shipped!
It’s been a super long road, and I’m eternally grateful to everybody who has helped along the way, including all of the wonderful early-bird customers!
Posture is on sale over at tryposture.com
This post is inspired by a blog post, a discussion on HN, and a chrome extension. The final result is zwBlocker: An extension that helps spot zero-width characters.
It all revolves around a basic idea: Your name (or email, username etc.) can be invisibly hidden in a piece of text that you copy and share somewhere else, identifying you as the person who shared it.
Tom’s post describes the concept in great detail, but the basic idea makes use of unicode characters with zero-width.
That is, when you insert a zero-width character into a piece of text, it will not be visible and will not (or may not) affect the rest of the text. However, these zero-width characters can be read by a machine and by using a series of these zero-width characters, we can encode invisible information into any piece of text — when an email is sent for example — and read it back later, when the text shows up on social media. …
About